[Pages] Add skill for ai webapi - #144
Merged
Neeraj Nandwana (neerajnandwana-msft) merged 4 commits intoJun 11, 2026
Merged
Conversation
Neeraj Nandwana (neerajnandwana-msft)
requested a review
from a team
as a code owner
May 7, 2026 08:47
Copilot started reviewing on behalf of
Neeraj Nandwana (neerajnandwana-msft)
May 7, 2026 08:48
View session
Contributor
There was a problem hiding this comment.
Pull request overview
Adds first-class support for Power Pages generative-AI “AI Web API” integrations (Search Summary + Data Summarization) by introducing a new /add-ai-webapi skill, extending the backend decision framework/plan UI, and adding an AI-only read mode contract to /integrate-webapi for safe Layer 1/2 delegation.
Changes:
- Introduces
/add-ai-webapiskill (Layer 3) with supporting references, evals, and a post-run validator (validate-ai-webapi.js) + tests. - Extends
/integrate-webapiwith an opt-in[AI-READ-ONLY]sentinel mode to generate read-only integration code and hardened permissions/settings for AI summarization. - Updates backend decision framework + HTML plan renderer to include “AI Web API”, plus updates skill tracking + hook utils to recognize and validate the new skill.
Reviewed changes
Copilot reviewed 23 out of 23 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| plugins/power-pages/skills/integrate-webapi/SKILL.md | Adds [AI-READ-ONLY] sentinel flow and AI-only read-mode branching for delegation from /add-ai-webapi. |
| plugins/power-pages/skills/integrate-backend/SKILL.md | Expands backend routing/decision matrix to include AI Web API and routes to /add-ai-webapi. |
| plugins/power-pages/skills/integrate-backend/references/decision-framework.md | Documents AI Web API as a 4th approach and updates comparison tables/combination guidance. |
| plugins/power-pages/skills/integrate-backend/assets/backend-plan.html | Updates plan UI to visualize AI Web API items (chips, stats, concepts, phase meta). |
| plugins/power-pages/skills/create-webroles/SKILL.md | Adds caller-suppress sentinel to avoid nested deploy prompts when invoked by orchestrators. |
| plugins/power-pages/skills/create-site/SKILL.md | Adds AI readiness planning + reserved “AI slot” markers for later /add-ai-webapi wiring. |
| plugins/power-pages/skills/add-ai-webapi/SKILL.md | New orchestrator skill for wiring Search Summary/Data Summarization and delegating prerequisites. |
| plugins/power-pages/skills/add-ai-webapi/scripts/validate-ai-webapi.js | New post-skill validator enforcing header/$select/content-type rules and prompt-size checks. |
| plugins/power-pages/skills/add-ai-webapi/references/scope-classification.md | New reference for Phase 3 per-target follow-ups (trigger + scope disambiguation). |
| plugins/power-pages/skills/add-ai-webapi/references/explore-prompt.md | New canonical Explore-agent prompt for AI integration discovery + prerequisite status. |
| plugins/power-pages/skills/add-ai-webapi/references/ai-api-reference.md | New API reference and operational guidance (headers, error codes, list-summary playbook). |
| plugins/power-pages/skills/add-ai-webapi/references/agent-invocation-prompt.md | New prompt template for invoking ai-webapi-integration consistently per target. |
| plugins/power-pages/skills/add-ai-webapi/evals/evals.json | Adds dry-run decision-trace eval definitions for classification/routing logic. |
| plugins/power-pages/scripts/tests/validate-ai-webapi.test.js | Adds unit tests covering validator blocking/warning behavior. |
| plugins/power-pages/scripts/tests/powerpages-hook-utils.test.js | Updates tracked-skill detection + validator-script mapping tests for /add-ai-webapi. |
| plugins/power-pages/scripts/tests/integrate-webapi-ai-only-mode.test.js | Adds regression tests ensuring AI-only read-mode branches remain in integrate-webapi docs. |
| plugins/power-pages/scripts/lib/powerpages-hook-utils.js | Registers add-ai-webapi as a tracked skill with validator script. |
| plugins/power-pages/references/skill-tracking-reference.md | Adds AddAiWebapi tracking constants/paths. |
| plugins/power-pages/README.md | Documents the new skill and updates skill/agent counts and recommended workflow ordering. |
| plugins/power-pages/agents/webapi-settings-architect.md | Documents tightened Webapi/<table>/fields rules for AI-only read mode. |
| plugins/power-pages/agents/table-permissions-architect.md | Documents hardened read-only table-permissions posture for AI-only read mode. |
| plugins/power-pages/agents/ai-webapi-settings-architect.md | New agent for Summarization/* site settings with list-summary sizing + YAML guidance. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Priyanshu Agrawal (priyanshu92)
approved these changes
May 11, 2026
Neeraj Nandwana (neerajnandwana-msft)
force-pushed
the
user/neerajnandwana/add-ai-webapi
branch
from
June 5, 2026 06:57
ae7e2f3 to
01684da
Compare
Copilot started reviewing on behalf of
Neeraj Nandwana (neerajnandwana-msft)
June 5, 2026 12:56
View session
Copilot started reviewing on behalf of
Neeraj Nandwana (neerajnandwana-msft)
June 8, 2026 12:19
View session
Copilot started reviewing on behalf of
Neeraj Nandwana (neerajnandwana-msft)
June 9, 2026 10:43
View session
Priyanshu Agrawal (priyanshu92)
approved these changes
Jun 10, 2026
Priyanshu Agrawal (priyanshu92)
approved these changes
Jun 10, 2026
Ashish Choudhary (ashishchoudhary001)
approved these changes
Jun 11, 2026
Copilot started reviewing on behalf of
Neeraj Nandwana (neerajnandwana-msft)
June 11, 2026 05:09
View session
Priyanshu Agrawal (priyanshu92)
approved these changes
Jun 11, 2026
Copilot started reviewing on behalf of
Neeraj Nandwana (neerajnandwana-msft)
June 11, 2026 08:21
View session
Adds the add-ai-webapi skill: Search Summary and Data Summarization integration for Power Pages code sites, with supporting agents, references, evals, and a PostToolUse validator. Routed from integrate-backend. Validator (validate-ai-webapi.js) highlights: - Header/$select/OData/content-type checks are project-wide (a token present anywhere under src/ satisfies them), so integrations that centralize header and URL construction in a shared helper are not false-failed. - Citation-parser detection matches the escaped-bracket regex form the skill ships (/\[\[(\d+)\]\]\(/) plus a literal [[N]]( token fallback. - CSRF rationale clarified: token is required on these POST requests regardless of mutation semantics; the endpoints are read-only. - Prompt-length error notes the request body accepts no prompt text (only InstructionIdentifier / RecommendationConfig). This commit collapses the prior branch history (which had been doubled by a bad self-merge) into a single clean change rebased onto current main, and adopts main's dynamic TRACKED_SKILLS discovery (add-ai-webapi is auto-tracked). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Neeraj Nandwana (neerajnandwana-msft)
force-pushed
the
user/neerajnandwana/add-ai-webapi
branch
from
June 11, 2026 08:44
c03206c to
4031b44
Compare
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copilot started reviewing on behalf of
Neeraj Nandwana (neerajnandwana-msft)
June 11, 2026 09:22
View session
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Priyanshu Agrawal (priyanshu92)
approved these changes
Jun 11, 2026
Neeraj Nandwana (neerajnandwana-msft)
deleted the
user/neerajnandwana/add-ai-webapi
branch
June 11, 2026 10:55
Copilot AI
added a commit
that referenced
this pull request
Jun 11, 2026
Merge origin/main (93e22d3) into branch — two files conflicted: - create-webroles/SKILL.md: kept gate markers from branch, incorporated caller-suppress-mode text added in main (#144). - integrate-webapi/SKILL.md: same — kept 3 gate markers from branch, incorporated AI-only-read-mode conditionals added in main (#144). New add-ai-webapi skill (#144) had 4 unmarked AskUserQuestion call sites that failed GATE-must-have-marker. Added gate markers + 🚦 prose blocks and §6.29 catalog rows for: - add-ai-webapi:iter.deploy-commit (Iteration mode) - add-ai-webapi:4.2.skip-webrole (Phase 4.2 skip confirmation) - add-ai-webapi:5.5.commit (Phase 5.5 offer to commit) - add-ai-webapi:6.4.commit (Phase 6.4 offer to commit) Verified: alm-lint: 0 findings; 1108/1108 tests pass.
6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add /add-ai-webapi: Power Pages generative-AI summarization (preview)
Summary
New user-invocable skill that wires the two Power Pages AI summarization endpoints — Search Summary (/_api/search/v1.0/summary) and Data Summarization (/_api/summarization/data/v1.0/...) — into a SPA site end-to-end: Layer 1/2
prerequisites (delegated to /integrate-webapi in AI-only read mode), Layer 3 service code with CSRF, framework wrappers, UI wiring with all four render branches, and Summarization/* site settings.
What's in the box
citation parser/rewrite.
Test plan